package day13;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

//测试可缓存线程池
public class Demo {
    public static void main(String[] args) {
        ExecutorService es = Executors.newCachedThreadPool();
        for (int i = 0; i < 10000; i++) {
            es.execute(()->{
                System.out.println(Thread.currentThread().getName());
            });
        }
        es.shutdown();
    }
}
